/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package ripemd160

import (
	"encoding/hex"

	md "golang.org/x/crypto/ripemd160"
)

func Encode(src string) string {
	hash := md.New()
	hash.Write([]byte(src))
	return hex.EncodeToString(hash.Sum(nil))
}
